package com.istone.myapplication.slice;

import com.isotne.glidelibrary.utils.OhosGlide;
import com.istone.myapplication.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Image;
import ohos.global.resource.NotExistException;

import java.io.IOException;
import java.io.InputStream;

/**
 * description gifslice
 * @author baihe
 * created 2021/2/8 14:53
 */
public class GifAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_gif);
        Image image = (Image) findComponentById(ResourceTable.Id_gif_image);

        try {
            OhosGlide.with(this).load(ResourceTable.Media_run).into(image);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
